package com.ryan.mms.privilage.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

import com.ryan.framework.model.Model;

/**
 * Role entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "operator_login_log", catalog = "framework")
public class OperatorLoginLog implements Model{

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 1168315135765L;
    
    
    private Long id;
    
    private String loginIp;
    
    private Long operatorId;

    private String loginName;

    private Long employeeId;
    
    private String employeeName;
	
	private String loginFrom;

	private Integer loginResult;
	
	private Integer failureType;
	
    private Date loginDate;
	
	private String description;
    
    public OperatorLoginLog() {
        super();
    }


	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = true)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "login_ip", nullable = false, length = 12)
	public String getLoginIp() {
		return loginIp;
	}

	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}

	@Column(name = "operator_id")
	public Long getOperatorId() {
		return operatorId;
	}

	public void setOperatorId(Long operatorId) {
		this.operatorId = operatorId;
	}

	@Column(name = "login_name")
	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	@Column(name = "employee_id")
	public Long getEmployeeId() {
		return employeeId;
	}

	public void setEmployeeId(Long employeeId) {
		this.employeeId = employeeId;
	}

	@Column(name = "employee_name")
	public String getEmployeeName() {
		return employeeName;
	}

	public void setEmployeeName(String employeeName) {
		this.employeeName = employeeName;
	}

	@Column(name = "login_from")
	public String getLoginFrom() {
		return loginFrom;
	}

	public void setLoginFrom(String loginFrom) {
		this.loginFrom = loginFrom;
	}

	@Column(name = "login_result")
	public Integer getLoginResult() {
		return loginResult;
	}

	public void setLoginResult(Integer loginResult) {
		this.loginResult = loginResult;
	}

	@Column(name = "failure_type")
	public Integer getFailureType() {
		return failureType;
	}

	public void setFailureType(Integer failureType) {
		this.failureType = failureType;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "login_date")
	public Date getLoginDate() {
		return loginDate;
	}

	public void setLoginDate(Date loginDate) {
		this.loginDate = loginDate;
	}

	@Column(name = "description", nullable = false, length = 12)
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}   
    
}